#pragma once

#include <pthread.h>

class ReadWriteLock
{
public:
    ReadWriteLock(void);
    ~ReadWriteLock(void);

    int ReadLock();
    int WriteLock();

    int TryReadLock();
    int TryWriteLock();

    int Unlock();

protected:
    pthread_rwlock_t        m_rwlock;
    //pthread_rwlockattr_t    m_attr;
};

